package iohomework;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class WriteStringDemo {
    public static void main(String[] args) throws IOException {

        File file=new File("fos.txt");
        FileOutputStream fos=new FileOutputStream(file);
        String line="等下一个天亮，把上次偷拍我的照片送我好吗？";
        byte[] data=line.getBytes(StandardCharsets.UTF_8);
        fos.write(data);
        System.out.println("创建成功");
        fos.close();


    }
}
